import request from '@/utils/request'
import linq from 'linq'
export async function getXsst(XXID,CJPC){
    //
    
    let res =  await request({
        url: `/Xssts?$filter=XXID eq '${XXID}' and CJPC eq '${CJPC}'`,
        method: 'get',
      })
      
    return res.data.value;
    //
    
}
export async function bulkAddXsst(data){
  //
  
  let res =  await request({
      url: '/Xssts/BulkAddXsst',
      method: 'post',
      data:data
    })
  return res.data.value;
  //
  
}
export async function updateXsst(model){
    let res =  await request({
        url: `/Xssts(${model.ID})`,
        method: 'put',
        data: model
      })
      
      return res.data;
}
export async function deleteXsst(model){
   
  
    let res = await  request({
        url: `/Xssts/${model.ID}`,
        method: 'delete',
      })
      
      return res.data;
}
export async function addXsst(model){

    let res =  await request({
      url: '/Xssts',
      method: 'post',
      data: model,
    })
    
    return res.data;
}